#include "worker0.h"
#include <iostream>
using std::cin;
using std::cout;
using std::endl;

/* Worker */

// 析构函数必须要实现，即使是纯虚的
Worker::~Worker() {}

void Worker::Set()
{
    cin >> fullname >> id;
    while (cin.get() != '\n') continue;
    
}
void Worker::Show() const
{
    cout << "Name: " << fullname << endl;
    cout << "ID: " << id << endl;
}

/* Waiter */

void Waiter::Set()
{
    
    Worker::Set(); // 继承，调用基类方法
    cin >> panache;
    while(cin.get() != '\n') continue;
    
}
void Waiter::Show() const
{
    cout << "服务生" << endl;
    Worker::Show();
    cout << "Panache rating: " << panache << endl;
}

/* Singer */

void Singer::Set()
{
    Worker::Set();
    cin >> voice;
    while(cin.get() != '\n') continue;
}
void Singer::Show() const
{
    cout << "歌手" << endl;
    Worker::Show();
    cout << "Voice range: " << voice << endl;
}